import Vue from "vue";
import VueRouter from "vue-router";
import routerList from "./routerList.js";
Vue.use(VueRouter);

const router = new VueRouter({
  mode: "history",
  routes: [...routerList],
});

router.beforeEach((to, from, next) => {
  // 路由守卫
  // console.log(to);
  // console.log(from);
  next();
});

export default router;
